<?php

namespace app\admin\controller;

use think\Controller;
use data\service\FriendLinkService;

class FriendLink extends BaseController
{

    private $service;

    // 模型初始化
    public function initialize()
    {
        parent::initialize();
        $this->service = new FriendLinkService();
    }

    public function index(){
        return $this->fetch();
    }

    public function add(){
        return $this->fetch();
    }

    public function edit($id){
        $data = $this->service->getById($id);
        $this->assign('data',$data);
        $this->assign('id',$id);
        return $this->fetch();
    }

}
